<?php 
require 'config.php';
ob_clean();
$iNews = getValue('iNews');
@$iCat  = getValue('iCat');
@$type  = getValue('type');
include_once('../includes/inc_news_detail_init.php');
if($iCat){
    redirect(DOMAIN.generate_detail_url($news,GetNamecat($news['new_cat_id'])));
}
if($type ==1){
    redirect(DOMAIN.generate_detail_url($news,GetNamecat($news['new_cat_id'])));
}
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
    if($iActive == 0){
        ?>
        <link rel="canonical" href="<?=$_SERVER['REQUEST_URI']?>"/>
        <meta name="description" content="Tin cập nhật, tin tức mới nhất, tin tức online về chủ đề <?=GetNamecat($iCat)?>"/>
        <meta property="og:title" content="Tin tức <?=GetNamecat($news['new_cat_id'])?>" />
        <meta property="og:url" content="<?=$_SERVER['REQUEST_URI']?>" />
        <title>Tin tức <?=GetNamecat($news['new_cat_id'])?></title>
        <?
    }
    include_once('../includes/inc_news_cat.php');
    exit();    
}else{
    //include_once('../includes/inc_nav.php');
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title><?=trim($news['new_title'])?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="vietnamese" />
<meta name="revisit-after" content="1 days" />
<meta name="AUTHOR" content="Vnupdate" />
<meta name="description" content="<?=$news['new_teaser'] != '' ? trim(htmlspecialchars(cut_string(removeHTML($news['new_teaser']),150),ENT_QUOTES)) : trim(htmlspecialchars(cut_string(removeHTML($news['new_detail']),150),ENT_QUOTES))?>"/>
<meta name="COPYRIGHT" content="Copyright (C) 2012 VnUpdate.net" />
<meta name="ROBOTS" content="INDEX, FOLLOW" />
<meta name="RATING" content="GENERAL" />
<meta property="og:title" content="<?=trim(htmlspecialchars($news['new_title'],ENT_QUOTES))?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?=DOMAIN?><?=$_SERVER['REQUEST_URI']?>" />
<meta property="og:image" content="<?=$news['new_picture']?>" />
<meta property="og:site_name" content="VnUpdate" />
<meta property="og:description" content="<?=$news['new_teaser'] != '' ? trim(htmlspecialchars(cut_string(removeHTML($news['new_teaser']),150),ENT_QUOTES)) : trim(htmlspecialchars(cut_string(removeHTML($news['new_detail']),150),ENT_QUOTES))?>"/>
<meta property="fb:admins" content="100004609203263" />
<meta property="fb:app_id" content="447585838689244"/>
<link href="<?=DOMAIN?>/favicon.png" type="image/x-icon" rel="shortcut icon"/>
<link rel="canonical" href="<?=DOMAIN.generate_detail_url($news,GetNamecat($news['new_cat_id']))?>" />
<?=$css_global?>
<?=$js_global?>
<script>
$(document).pjax('.nav-menu a', '#pjax-wrapper'); 
</script>
</head>
<body>
<?php include_once('../social_plugin/facebook_root.php');?>
    <?php include_once('../includes/inc_header.php');?>
    <?php include_once('../includes/inc_nav.php');?>
    <div class="wrapper" id="pjax-wrapper">
        <?php include_once('../includes/inc_news_detail.php');?>
    </div><!-- End wrapper -->
     <?php include_once('../includes/inc_footer.php');?>
    <div class="develop_debug">Generate time : <?=(microtime_float() - $generate_time)?></div>
</body>
</html>
